/* 基本样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  width: 350px;
  max-height: 500px;
  overflow-x: hidden;
  overflow-y: auto;
  color: #333;
  background-color: #f5f5f5;
}

/* 头部样式 */
.header {
  background-color: #4285f4;
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 16px;
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.header-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 内容区域样式 */
.content {
  padding: 16px;
}

/* 无链接提示样式 */
.no-links-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  color: #5f6368;
}

.no-links-message svg {
  fill: #dadce0;
  margin-bottom: 16px;
}

.no-links-message p {
  margin: 8px 0;
}

/* 链接列表样式 */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-item {
  background-color: white;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}

.link-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.link-info {
  flex: 1;
  min-width: 0;
  margin-right: 12px;
}

.link-url {
  font-size: 14px;
  font-weight: 500;
  color: #1a73e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.link-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #5f6368;
}

.link-page {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.link-time {
  white-space: nowrap;
}

.link-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.action-btn svg {
  fill: #5f6368;
  transition: fill 0.2s;
}

.action-btn:hover {
  background-color: #f1f3f4;
}

.action-btn:hover svg {
  fill: #1a73e8;
}

.delete-btn:hover svg {
  fill: #ea4335;
}

/* 底部样式 */
.footer {
  padding: 12px 16px;
  border-top: 1px solid #dadce0;
  display: flex;
  justify-content: center;
  position: sticky;
  bottom: 0;
  background-color: #f5f5f5;
  z-index: 10;
}

.clear-all-btn {
  background-color: #f1f3f4;
  color: #5f6368;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.clear-all-btn:hover:not(:disabled) {
  background-color: #e8eaed;
}

.clear-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 提示消息样式 */
.toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #323232;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 辅助类 */
.hidden {
  display: none;
}